home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / RTPC10 / MOUSE_D.PAS < prev    next >
Pascal/Delphi Source File  |  1993-11-20  |  3KB  |  80 lines

  1. {
  2.   ┌────────┬──────────────────────────────────────────────────────┐
  3.   │Name    │ MOUSE_D.PAS                                          │
  4.   ├────────┼──────────────────────────────────────────────────────┤
  5.   │Use     │ Example program that uses the MOUSE.TPU.             │
  6.   ├────────┼──────────────────────────────────────────────────────┤
  7.   │By      │ Rafe Aldridge - (C) Copyright 1993                   │
  8.   └────────┴──────────────────────────────────────────────────────┘
  9.  
  10.   ┌───────────────────────────────────────────────────────────────┐
  11.   │ Rafe's TP Collection is SHAREWARE                             │
  12.   ├───────────────────────────────────────────────────────────────┤
  13.   │                                                               │
  14.   │ If you find any part of Rafe's TP Collection usefull then     │
  15.   │ please become a registered user by sending 10 Pounds Sterling │
  16.   │ to the address below. In return you will recieve the LATEST   │
  17.   │ FULL source code to ALL the units as well anything new.       │
  18.   │                                                               │
  19.   │ Please feel free to write with suggestions, ideas or money to │
  20.   │     Rafe Aldridge,                                            │
  21.   │     Street Farm,                                              │
  22.   │     Dereham Road,                                             │
  23.   │     Garvestone,                                               │
  24.   │     Norfolk.                                                  │
  25.   │     NR9 4QT                                                   │
  26.   │     ENGLAND                                                   │
  27.   │                                                               │
  28.   └───────────────────────────────────────────────────────────────┘
  29. }
  30. uses Crt,Mouse;
  31.  
  32. var
  33.   X,Y : Word;
  34.   S   : String;
  35.  
  36. begin
  37.   Clrscr;
  38.   if not Mreset then
  39.     begin
  40.       Writeln('No Mouse Driver!');
  41.       Halt(0);
  42.     end;
  43.   SetTPointer ($77FF,$7700,False);
  44.   SetPointer (true);
  45.   SetPos (5,5);
  46.   S:='Move mouse about, then click on this to continue.';
  47.   Writeln (s);
  48.   repeat
  49.     begin
  50.       GetPos (X,Y);
  51.       GotoXY (2,2);
  52.       Writeln ('X: ',X,'   Y: ',Y,'   ');
  53.     end; { repeat }
  54.   until (IsIt(0,0,Length(S)*8,0)) and (GetButton>0);
  55.   Delay (500);
  56.   Writeln;
  57.   Writeln ('New Style Pointer! Press a button to continue');
  58.   SetTPointer ($7777,$FFFF,False);
  59.   repeat until GetButton>0;
  60.   Delay (500);
  61.   Writeln;
  62.   Writeln ('I have now set a limit to where you can go!');
  63.   Writeln ('Press a button to continue');
  64.   TextBackground (1);
  65.   Window (20,20,70,24);
  66.   ClrScr;
  67.   SetLimits (152,152,552,186);
  68.   repeat until GetButton>0;
  69.   Delay (500);
  70.   Writeln;
  71.   Writeln (' Now you can go anywhere BUT this box!');
  72.   Writeln (' Press a button to continue');
  73.   SetLimits (0,0,632,192);
  74.   SetNoLimits (152,152,552,186);
  75.   repeat until GetButton>0;
  76.   Writeln;
  77.   TextBackground (0);
  78.   Window (1,1,80,25);
  79.   ClrScr;
  80. end.